package demo3;

public class Student {
    private int id;
    private String name;
    private String sex;
    private int age;

    public static void main(String[] args) {
        Student student = new Student();
        student.setAge(10);
        student.setId(2023);
        student.setName("张三");
        student.setSex("男");
        student.getAge();
        student.getId();
        student.getName();
        student.getSex();
        student.println();
    }

    public void println(){
        System.out.println("这个学生的姓名是："+this.name);
        System.out.println("这个学生的年龄是："+this.age);
        System.out.println("这个学生的性别是："+this.sex);
        System.out.println("这个学生的学号是："+this.id);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
